<?php
	$trn_id="";
	if(isset($_GET['trn_id'])){
		$trn_id = mysql_real_escape_string($_GET['trn_id']); 
	}else{
		?>
		<script>
			history.go(-1);
		</script>
		<?php
	}
?>
<?php
	include('header.php');
?>
<script>
	
	$(function() {
		
		
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		$( "#dialog:ui-dialog" ).dialog( "destroy" );
		
		var name = $( "#name" ),
			idReceiver = $( "#idReceiver" ), 
		    tpdID = $( "#tpdID" ),
			postcode = $( "#postcode" ),
			addpostcode = $( "#addpostcode" ),
			addname = $( "#addname" ),
			allFields = $( [] ).add( name ).add( postcode ).add( addpostcode ).add( addname ),
			tips = $( ".validateTips" );

		function updateTips( t ) {
			tips
				.text( t )
				.addClass( "ui-state-highlight" );
			setTimeout(function() {
				tips.removeClass( "ui-state-highlight", 1500 );
			}, 500 );
		}

		function checkLength( o, n, min, max ) {
			if ( o.val().length > max || o.val().length < min ) {
				o.addClass( "ui-state-error" );
				updateTips( "Length of " + n + " must be between " +
					min + " and " + max + "." );
				return false;
			} else {
				return true;
			}
		}
		
		function errorField( o, n ) {
				o.addClass( "ui-state-error" );
				updateTips( n );
				return false;
		}

		function checkRegexp( o, regexp, n ) {
			if ( !( regexp.test( o.val() ) ) ) {
				o.addClass( "ui-state-error" );
				updateTips( n );
				return false;
			} else {
				return true;
			}
		}
		
		
		//set ready initiate
		var recID = $("#receiverdd option:selected").val();
		var data = 'recID='+recID;
		$.ajax({
			url: "ajax/receiver.php",  
			type: "GET",        
			data: data,     
			cache: false,
			success: function (result) {  
				if(result != '-1' && result.indexOf(",") != -1){
					var nameEnt = result.split(",");
					if(nameEnt[1] != "" && nameEnt[1].length > 0 ){
						var addr = nameEnt[1];
						var addrSplit = addr.split("-");
						$('#recpostcode').val(addrSplit[0]);
						$('#reccity').val(addrSplit[1]);
						$('#recstate').val(addrSplit[2]); 
					}
					
				}else if(result == '-1'){
					$('#recpostcode').val('');
					$('#reccity').val('');
					$('#recstate').val(''); 
					$('#divAddReceiver').show(); 
				}else{
					$('#recpostcode').val('');
					$('#reccity').val('');
					$('#recstate').val(''); 
					$('#divUpdReceiver').show(); 
				}
			}       
		});
				
		$("#receiverdd").change(function () {
			
			$('#divUpdReceiver').hide(); 
			$('#divAddReceiver').hide(); 
			var recID = $("#receiverdd option:selected").val();
				var data = 'recID='+recID;
				$.ajax({
					url: "ajax/receiver.php",  
					type: "GET",        
					data: data,     
					cache: false,
					success: function (result) {  
						if(result != '-1' && result.indexOf(",") != -1){
							var nameEnt = result.split(",");
							if(nameEnt[1] != "" && nameEnt[1].length > 0 ){
								var addr = nameEnt[1];
								var addrSplit = addr.split("-");
								$('#recpostcode').val(addrSplit[0]);
								$('#reccity').val(addrSplit[1]);
								$('#recstate').val(addrSplit[2]); 
							}
							
						}else if(result == '-1'){
							$('#recpostcode').val('');
							$('#reccity').val('');
							$('#recstate').val(''); 
							$('#divAddReceiver').show(); 
						}else{
							$('#recpostcode').val('');
							$('#reccity').val('');
							$('#recstate').val(''); 
							$('#divUpdReceiver').show(); 
						}
					}       
				});
        });	
		$("#searchnamebtn").button()
			.click(function() {	
				var searchname = $('#searchname').val();
				$('#loading').show();  
				var data = 'searchname='+searchname;
				$.ajax({
					url: "ajax/receiver.php",  
					type: "GET",        
					data: data,     
					cache: false,
					success: function (result) {  
						//hide the progress bar
						$('#loading').hide();   
						allFields.removeClass( "ui-state-error" );
						if(result != ''){
							var nameEnt = result.split(",");
							$('#addname').val(nameEnt[0]);
							if(nameEnt[1] != ""){
								var addr = nameEnt[1];
								var addrSplit = addr.split("-");
								$('#addpostcode').val(addrSplit[0]);
								$('#addcity').val(addrSplit[1]);
								$('#addstate').val(addrSplit[2]); 
							}
							
						}else {
							$('#addname').val('');
							alert('Search for name not found!');
							
						}
					}       
				});
				
				return false;
			
		});
		$( "#dialog-addreceiver" ).dialog({
			autoOpen: false,
			height: 450,
			width: 350,
			modal: true,
			buttons: {
				"Create a receiver": function() {
					var bValid = true;
					allFields.removeClass( "ui-state-error" );

					bValid = bValid && checkLength( addname, "Name", 3, 150 );
					bValid = bValid && checkLength( addpostcode, "Postcode", 5, 5 );
				
					//bValid = bValid && checkRegexp( addname, /^[a-z]([0-9a-z_])+$/i, "Name may consist of a-z, 0-9, underscores, begin with a letter." );
					bValid = bValid && checkRegexp( addpostcode, /^[0-9]([0-9_])+$/i, "Postcode may consist of 0-9." );
					
					$('#loading').show();  
					var data = 'tpdID='+tpdID.val()+'&name='+addname.val()+'&postcode='+addpostcode.val();
					$.ajax({
						url: "ajax/apostcode.php",  
						type: "GET",        
						data: data,     
						cache: false,
						success: function (res) {  
							if(res == 1){
								//location.reload();
								//window.location = document.URL;
							}
							//hide the progress bar
							$('#loading').hide();          
						}       
					});
					
					
					if ( bValid ) {
						$( "#users tbody" ).append( "<tr>" +
							"<td>" + addname.val() + "</td>" + 
							"<td>" + addpostcode.val() + "</td>" + 
						"</tr>" ); 
						$( this ).dialog( "close" );
					}
					
					
				},
				Cancel: function() {
					$( this ).dialog( "close" );
				}
			},
			close: function() {
				allFields.val( "" ).removeClass( "ui-state-error" );
			}
		});
		$( "#dialog-updPostcode" ).dialog({
			autoOpen: false,
			height: 350,
			width: 350,
			modal: true,
			buttons: {
				"update a receiver": function() {
					var bValid = true;
					allFields.removeClass( "ui-state-error" );
					
					bValid = bValid && checkLength( postcode, "postcode", 5, 5 );
					bValid = bValid && checkRegexp( postcode, /^[0-9]([0-9_])+$/i, "Postcode may consist of 0-9." );
					
			
					$('#loading').show();  
					var data = 'recID='+idReceiver.val()+'&postcode='+$( "#postcode" ).val();
					$.ajax({
						url: "ajax/upostcode.php",  
						type: "GET",        
						data: data,     
						cache: false,
						success: function (res) {  
							if(res == 1){
								location.reload();
								//window.location = document.URL;
							}
							//hide the progress bar
							$('#loading').hide();          
						}       
					});
					
					if ( bValid ) {
						$( "#users tbody" ).append( "<tr>" +
							"<td>" + postcode.val() + "</td>" + 
						"</tr>" ); 
						$( this ).dialog( "close" );
					}
					
				},
				Cancel: function() {
					$( this ).dialog( "close" );
				}
			},
			close: function() {
				allFields.val( "" ).removeClass( "ui-state-error" );
			}
		});
		$('#addpostcode').bind('keyup paste click', function()  {
			$('#addcity').val('');
			$('#addstate').val('');  
			
			var pcode = $('#addpostcode').val();
			var charFirst = pcode.substr(0, 1);

			if(charFirst != '7' ){
				$('#addpostcode').val('7');
			}
				
			var num = $('#addpostcode').val().length;
			var num = $('#addpostcode').val().replace(/^\s\s*/, '').replace(/\s\s*$/, '');
			var intRegex = /^\d+$/;
			if(num.length>=5) {
				var data = 'postcode='+num;
				$('#loading').show();  
				$.ajax({
					url: "ajax/postcode.php",  
					type: "GET",        
					data: data,     
					cache: false,
					success: function (result) {  
						//hide the progress bar
						$('#loading').hide();   
						allFields.removeClass( "ui-state-error" );
						tips.text('Fill in name and postcode field only. Postcode field must start from 7.');
						if(result == ','){
							var bValid = true;
							
							
							bValid = bValid && errorField( addpostcode, "Postcode not found! Re-type another postcode" );
							if ( bValid ) {
								allFields.val( "" ).removeClass( "ui-state-error" );
							}
						}else {
							var  resultSplit = result.split(",");
							$('#addcity').val(resultSplit[0]);
							$('#addstate').val(resultSplit[1]);   
						}
					}       
				});
			}
		});
		
		$('#postcode').bind('keyup paste click', function()  {
			$('#city').val('');
			$('#state').val('');  
			
			var pcode = $('#postcode').val();
			var charFirst = pcode.substr(0, 1);

			if(charFirst != '7' ){
				$('#postcode').val('7');
			}
				
			var num = $('#postcode').val().length;
			var num = $('#postcode').val().replace(/^\s\s*/, '').replace(/\s\s*$/, '');
			var intRegex = /^\d+$/;
			if(num.length>=5) {
				var data = 'postcode='+num;
				$('#loading').show();  
				$.ajax({
					url: "ajax/postcode.php",  
					type: "GET",        
					data: data,     
					cache: false,
					success: function (result) {  
						//hide the progress bar
						$('#loading').hide();   
						allFields.removeClass( "ui-state-error" );
						tips.text('Fill in postcode field only. Postcode field must start from 7.');
						if(result == ','){
							var bValid = true;
							
							
							bValid = bValid && errorField( postcode, "Postcode not found! Re-type another postcode" );
							if ( bValid ) {
								
								allFields.val( "" ).removeClass( "ui-state-error" );
							}
						}else {
							var  resultSplit = result.split(",");
							$('#city').val(resultSplit[0]);
							$('#state').val(resultSplit[1]);   
						}
					}       
				});
			}
		});
		$("#addReceiver").button()
			.click(function() {
				$("#dialog-addreceiver" ).dialog( "open" );
				tips.text('Fill in name and postcode field only. Postcode field must start from 7.');
				return false;

		});
		$("#updReceiver").button()
			.click(function() {	
				$('#city').val('');
				$('#state').val('');  
				$( "#dialog-updPostcode" ).dialog( "open" );
				tips.text('Fill in postcode field only. Postcode field must start from 7.');
				var recID = $("#receiverdd option:selected").val();

				var data = 'recID='+recID;
				$('#loading').show();  
				$.ajax({
					url: "ajax/receiver.php",  
					type: "GET",        
					data: data,     
					cache: false,
					success: function (html) {  
					 
						//hide the progress bar
						$('#loading').hide();   
						 
						//add the content retrieved from ajax and put it in the #content div
						var nameEnt = html.split(",");
						$('#name').val(nameEnt[0]);
						$('#idReceiver').val(recID);
						   
					}       
				});
				
				return false;
		});

	});
</script>
	<div id="dialog-addreceiver" title="Create new receiver">
		<p class="validateTips">Fill in name and postcode field only. Postcode field must start from 7.</p>

		<form>
		<span id="loading" style="display:none;" >loading.....</span>
		<fieldset>
			<label for="searchname">Search Name</label>
			<input type="text" name="searchname" id="searchname" class="text ui-widget-content ui-corner-all" />
			<button style="margin-top:-7px;" id='searchnamebtn'>Search Exact Name</button>
			<label style="display:block;">&nbsp;</label>
			
			<label for="addname">Name</label>
			<input type="text" name="addname" id="addname" class="text ui-widget-content ui-corner-all" />
			<label for="addpostcode">Postcode</label>
			<input type="text" name="addpostcode" id="addpostcode" value="" class="text ui-widget-content ui-corner-all" />
			<label for="addcity">City</label>
			<input type="text" name="addcity" id="addcity" value="" class="text ui-widget-content ui-corner-all" readonly style="background:#f2f2f2;"/>
			<label for="addstate">State</label>
			<input type="text" name="addstate" id="addstate" value="" class="text ui-widget-content ui-corner-all" readonly style="background:#f2f2f2;"/>
		</fieldset>
		</form>
	</div>
	
	<div id="dialog-updPostcode" title="Update receiver">
		<p class="validateTips">Fill in postcode field only. Postcode field must start from 7.</p>

		<form>
		<span id="loading" style="display:none;">loading.....</span>
		<fieldset>
			<label for="name">Name</label>
			<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" readonly  style="background:#f2f2f2;"/>
			<label for="postcode">Postcode</label>
			<input type="text" name="postcode" id="postcode" value="" class="text ui-widget-content ui-corner-all" />
			<label for="city">City</label>
			<input type="text" name="city" id="city" value="" class="text ui-widget-content ui-corner-all" readonly  style="background:#f2f2f2;"/>
			<label for="state">State</label>
			<input type="text" name="state" id="state" value="" class="text ui-widget-content ui-corner-all" readonly  style="background:#f2f2f2;"/>
		</fieldset>
		<input type="hidden" name="idReceiver" id="idReceiver"  />
		</form>
	</div>

		<!--[if !IE]>start content<![endif]-->
		<div id="content">
			<div class="inner">
				<!--[if !IE]>start section<![endif]-->
				<?php
					if(isset($_POST['reset'])){
						$_POST = "";
					}
					if(isset($_POST['addpackage'])){
						$tpdID= mysql_real_escape_string($_POST['tpdID']);
						$notvalid = false;
						
						if (empty($_POST['tpd_tdn_no'])){
							$errors[] = 'Please Insert TDN No.';
							$notvalid = true;
						}
						if (empty($_POST['tpd_do_ref'])){
							$errors[] = 'Please Insert DO No.';
							$notvalid = true;
						}
						if(empty($_POST['tpd_qty'])){
							$errors[] = 'Please Insert Quantity';
							$notvalid = true;
						}
						if(empty($_POST['tpd_qty_type'])){
							$errors[] = 'Please Insert Type';
							$notvalid = true;
						}
						if (empty($_POST['senderdd'])){
							$errors[] = 'Please Select Sender';
							$notvalid = true;
						}
						if (empty($_POST['receiverdd'])){
							$errors[] = 'Please Select Receiver';
							$notvalid = true;
						}
						
						

						
						if($notvalid == true){
							echo"
								<div class='section'>
									<ul class='system_messages'>
									<li class='yellow'><span class='ico'></span>
										<strong class='system_title'>Warning!</strong>";
							while (list($key,$value) = each($errors))
							{
									echo "<br/><span class='system_title'>".$value."</span>";
							}
							echo "	</li>
									</ul>
								</div>";
						}else{
						
							$tpd_tdn_no = strtoupper(mysql_real_escape_string($_POST['tpd_tdn_no'])); 
							$tpd_do_ref = strtoupper(mysql_real_escape_string($_POST['tpd_do_ref'])); 
							$tpd_qty = strtoupper(mysql_real_escape_string($_POST['tpd_qty'])); 
							$tpd_qty_type = strtoupper(mysql_real_escape_string($_POST['tpd_qty_type'])); 
							$senderdd = intval(mysql_real_escape_string($_POST['senderdd'])); 
							$receiverdd = intval(mysql_real_escape_string($_POST['receiverdd'])); 
							

							$tpd_status="TPD01";
							$tpd_status_remarks="Start delivering";
							$sqlInsertTPD = "  INSERT INTO transport_package_delivering 
											(tpd_trn_id,tpd_sender_ent_id,tpd_receiver_ent_id,tpd_tdn_no,tpd_do_ref,
												tpd_qty,tpd_qty_type,tpd_type_pallet,tpd_delivered_date,
												tpd_status,tpd_status_remarks,tpd_created_date,tpd_created_by,tpd_modified_date,tpd_modified_by) 
											VALUES
											('$trn_id','$senderdd','$receiverdd','$tpd_tdn_no','$tpd_do_ref',
												'$tpd_qty','$tpd_qty_type','TDN',now(),
												'$tpd_status','$tpd_status_remarks',now(),'$_SESSION[log_userlogin_id]',now(),'$_SESSION[log_userlogin_id]')";
							echo  'sss'.$resInsertTPD = $db->sql_query($sqlInsertTPD);
							$TPDid = $db->sql_insertID();
							
							$sqlInsertLog = " INSERT INTO tpd_status_log 
										(tsl_tpd_id,tsl_tdn_no,tsl_status,tsl_status_remarks,tsl_created_date,tsl_created_by) 
											VALUES
										('$TPDid','$tpd_tdn_no','$tpd_status','Add package - set status TPD01',NOW(),'$_SESSION[log_userlogin_id]')";
							$resInsertLog= $db->sql_query($sqlInsertLog);
							
							if ($resInsertLog){	

								//	Display success																			
								echo'
								<div class="section">
									<ul class="system_messages">
										<li class="green"><span class="ico"></span><strong class="system_title">Package Added !</strong></li>
									</ul>
								</div>
									';
							}
						}
							
						
					
					}
				
				?>
				<!--[if !IE]>end section<![endif]-->
				
				<!--[if !IE]>start section<![endif]-->
				<div class="section">
					
					<!--[if !IE]>start title wrapper<![endif]-->
					<div class="title_wrapper">
						<span class="title_wrapper_top"></span>
						<div class="title_wrapper_inner">
							<span class="title_wrapper_middle"></span>
							<div class="title_wrapper_content">
								<h2>Add Package</h2>
								
							</div>
						</div>
						<span class="title_wrapper_bottom"></span>
					</div>
					<!--[if !IE]>end title wrapper<![endif]-->
					
					<!--[if !IE]>start section content<![endif]-->
					<div class="section_content">
						<span class="section_content_top"></span>
						
						<div class="section_content_inner">

						<!--[if !IE]>start forms<![endif]-->
						<form action="" method="POST" class="search_form general_form">
							
							<!--[if !IE]>start fieldset<![endif]-->
							<fieldset>
								<!--[if !IE]>start forms<![endif]-->
								<div class="forms">
								
								
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>TDN No. :</label>
									<div class="inputs">
										<span class="input_wrapper" style="width:300px;">
											<input name="tpd_tdn_no"   class="text" value="<?php if(isset($_POST['tpd_tdn_no'])) echo $_POST['tpd_tdn_no'] ?>" type="text" /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>DO No. :</label>
									<div class="inputs">
										<span class="input_wrapper" style="width:300px;">
											<input name="tpd_do_ref"  maxlength="20" class="text" value="<?php if(isset($_POST['tpd_do_ref'])) echo $_POST['tpd_do_ref'] ?>" type="text" /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>Quantity :</label>
									<div class="inputs">
										<span class="input_wrapper" style="width:300px;">
											<input name="tpd_qty" maxlength="5" class="text numbersOnly" value="<?php if(isset($_POST['tpd_qty'])) echo $_POST['tpd_qty'] ?>" type="text" /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>Type :</label>
									<div class="inputs">
										<span class="input_wrapper" style="width:300px;">
											<input name="tpd_qty_type" maxlength="10" class="text" value="<?php if(isset($_POST['tpd_qty_type'])) echo $_POST['tpd_qty_type'] ?>" type="text" /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								
								</div>
								<!--[if !IE]>end forms<![endif]-->
								
							</fieldset>
							<!--[if !IE]>end fieldset<![endif]-->
							
							<!--[if !IE]>start fieldset<![endif]-->
							<fieldset>
								<!--[if !IE]>start forms<![endif]-->
								<div class="forms">
								<h3>Sender Information</h3>
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>Sender :</label>
									<div class="inputs">
										<span class="input_wrapper select_wrapper" style="width:400px;" >
											<select name="senderdd" id="senderdd" class="ui-widget ui-widget-content ui-corner-left" >
												<?php
												
												$qList= "select * from entity where ent_old_id is not null ";
												$rList = $db->sql_fetch($qList);
												echo '<option value="" >Please Select</option>';
												foreach ($rList as $i) {
													echo '<option value="'.$i['ent_id'].'" ';  if(isset($_POST['senderdd']) && $_POST['senderdd'] == $i['ent_id']) echo 'selected'; echo'>'.$i['ent_code'].' - '.$i['ent_short_name'].'</option>';
												}
												?>
											</select>
										</span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								</div>
								<!--[if !IE]>end forms<![endif]-->
								
							</fieldset>
							<!--[if !IE]>end fieldset<![endif]-->
							
							<!--[if !IE]>start fieldset<![endif]-->
							<fieldset>
								<!--[if !IE]>start forms<![endif]-->
								<div class="forms">
								<h3>Receiver Information</h3>
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>Receiver :</label>
									<div class="inputs">
										<span class="input_wrapper select_wrapper"  style="width:400px;">
											<select name="receiverdd" id="receiverdd" class="ui-widget ui-widget-content ui-corner-left">
												<?php
												
												$qList= "select * from entity where ent_old_id is  null ";
												$rList = $db->sql_fetch($qList);
												echo '<option value="" >Please Select</option>';
												foreach ($rList as $i) {
													echo '<option value="'.$i['ent_id'].'" '; if(isset($_POST['receiverdd']) && $_POST['receiverdd'] == $i['ent_id']) echo 'selected'; echo'>'.str_replace("<","&lt;",$i['ent_short_name']).'</option>';
												}
												?>
											</select>
										</span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row" id="divAddReceiver" style="display:none">
									<div class="inputs">
										<span style="float:right; margin-top:5px;" >
											<button id='addReceiver'>Add Receiver</button>
										<span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row" id="divUpdReceiver" style="display:none">
									<div class="inputs">
										<span style="float:right; margin-top:5px;" >
											<button id='updReceiver'>Update Postcode</button>
										<span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>Postcode :</label>
									<div class="inputs">
										<span class="input_wrapper" style="border:none"><input readonly id="recpostcode"   class="text " value="" type="text"  /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>City :</label>
									<div class="inputs">
										<span class="input_wrapper" style="border:none"><input readonly id="reccity"   class="text " value="" type="text"  /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<label>State :</label>
									<div class="inputs">
										<span class="input_wrapper" style="border:none"><input readonly id="recstate"  class="text " value="" type="text"  /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								</div>
								<!--[if !IE]>end forms<![endif]-->
								
							</fieldset>
							<!--[if !IE]>end fieldset<![endif]-->
							
							<fieldset>	
								<!--[if !IE]>start forms<![endif]-->
								<div class="forms">								
							
								<!--[if !IE]>start row<![endif]-->
								<div class="row">
									<div class="inputs">
										<input name="tpdID" id="tpdID"   class="text" value="<?php  echo $Rtpd['tpd_id']; ?>" type="hidden"  />
										<span class="button green_button"><span><span>ADD PACKAGE</span></span><input name="addpackage" type="submit" /></span>
									</div>
								</div>
								<!--[if !IE]>end row<![endif]-->
								
								</div>
								<!--[if !IE]>end forms<![endif]-->
								</fieldset>
							<!--[if !IE]>end fieldset<![endif]-->
						</form>
						
						<!--[if !IE]>end forms<![endif]-->
						
						</div>
						
						<span class="section_content_bottom"></span>
					</div>
					<!--[if !IE]>end section content<![endif]-->
				</div>
				<!--[if !IE]>end section<![endif]-->
				
				
				
				
				
				
					
				
			</div>
		</div>
		<!--[if !IE]>end content<![endif]-->

<?php
	include('footer.php');
?>